import request from '@/utils/request';

// 查询专属指标同步网端下拉项
export function queryIndicatorSyncSegmentOptions(data: any): ApiPromise<ApiResponse> {
	// debugger;
	return request({
		url: '/management/option/queryIndicatorSyncSegmentOptions',
		method: 'get',
		params: data,
	});
}

// 查询专属指标同步系统下拉项
export function queryIndicatorSyncSystemOptions(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/option/queryIndicatorSyncSystemOptions',
		method: 'get',
		params: data,
	});
}

// 查询专属指标同步业务下拉项
export function queryIndicatorSyncBusinessOptions(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/option/queryIndicatorSyncBusinessOptions',
		method: 'get',
		params: data,
	});
}

// 查询可同步的业务服务资源列表
export function querySureSyncResource(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/exclusiveIndicator/querySureSyncResource',
		method: 'post',
		data: data,
	});
}

// 查询已同步的业务服务资源列表
export function queryAlreadySyncResource(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/exclusiveIndicator/queryAlreadySyncResource',
		method: 'post',
		data: data,
	});
}

// 专属指标同步
export function sync(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/exclusiveIndicator/sync',
		method: 'put',
		data: data,
	});
}

// 专属指标同步移除
export function unSync(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/exclusiveIndicator/unSync',
		method: 'put',
		data: data,
	});
}

// 专属指标同步所有
export function syncAll(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/exclusiveIndicator/syncAll',
		method: 'put',
		data: data,
	});
}

// 专属指标同步移除所有
export function unSyncAll(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/exclusiveIndicator/unSyncAll',
		method: 'put',
		data: data,
		headers: {
			VERSION: 'LSH',
		},
	});
}
